<?php use_helper('Form','Javascript')?>
<div class="box">
  <div class="form_title">
    <?php echo $search_title ?>
  </div>
  <?php 
    echo 
      form_remote_tag(
        array(
          'url'=>$search_url,
          'update'=>'contactGrid',
          'script'=>true,
          'loading'=>"Element.show('indicator')",
          'complete'=>"Element.hide('indicator');Element.show('contactGrid');Element.hide('contactCell');",
        )
      )
  ?>
  <?php echo input_hidden_tag('dialog_mode',$sf_params->get('dialog_mode','0'))?>
    <table>
      <tbody>
        <?php $myContactSearchForm->renderFields()?>
      </tbody>
      <tfoot>
        <tr>
          <td class="form_buttons"  colspan="6">
            <?php echo submit_tag('Search')?> | 
            <?php echo reset_tag('Reset')?>
          </td>
        </tr>
      </tfoot>
    </table>
  </form>
</div>
<br/>
<table>
  <tr>
    <td id="contactGrid" style="width:800px;vertical-align:top;">
    </td>
    <td id="contactCell"  style="display:none">
      <?php echo link_to_function('Show Search Results',"Element.hide('contactCell'); Element.show('contactGrid');")?>
      <div id="contactBox"></div>
    </td>
  </tr>
</table>
